// 订单模块 假设包含订单状态的修改 以及 内容的增加、替换等
const initState = {
    orderList: []
}

const orderReducer = (state=initState, action) => {
    console.log(action);
    switch (action.type) {
        case 'add':
            let orderTem = [...state.orderList]; // 先获取原来的订单内容
            orderTem.push(action.goods); // 追加订单
            return {
                ...state,
                orderList: [...orderTem]
            }
    
        default:
            return state
    }
}

export default orderReducer